This page last changed on Apr 29, 2007 by scytacki.
Disclamer
This system is in flux. What is describe here is the way it exists right now. I'm pretty sure it will have to change to deal with how we are going to use it.
Terminology
I used the dash notation so these terms aren't confused with classes. Some of them have classes or interfaces but not all of them.
- ot-object the core building block of OTrunk.
- ot-class this is the class of an ot-object. Currently it is declared as a java interface, but it is intended to be platform and language independent.
- ot-view this is a "view" of an ot-object. Call it a "view" is a bit confusing, because it more like a controller in the model-view-controller pattern. An ot-view returns an rendered-object which is what is actually displayed. ot-views are created using the view-factory by calling the getView method. There is an OTView interface in java which marks objects which are ot-views.
- rendered-object the object or string the ot-view returns for display. Currently this can be a JComponent or a string of xhtml text.
- view-requester the object calling getView. Typically this object is another ot-view that contains other ot-views. For example the ot-view which displays compound documents (OTCompoundDocView, OTrunkViewer, OTrunkAppletViewer, OTMultipleChoice, OTGraph can ask for plugins) is a view-requester. This term is not used in the code, but it helps for describing the system.
- view-factory this object provides views to view-requesters. The java interface OTViewFactory defines the methods a view-factory must implement.
- view-entry this is how a ot-view is defined and configured in an otml file. It has the class name of the ot-view object and the class name of the ot-object it can be a view for. An ot-view can access its view-entry view-entry throw the OTViewEntryAware interface. The view-entry can be extended so further configuration options can be passed to the ot-view. view-entries can also be referenced directly, so the same ot-class can have multiple views.
<OTViewEntry
objectClass="org.concord.graph.util.state.OTDrawingTool"
viewClass="org.concord.datagraph.state.OTDataDrawingToolView"/>
- view-mode this is used so same view can be rendered in multiple way. Examples of view-modes are "author", "author-embed", and "report". A view mode is defined in the otml file and contains a default view-entry, and a set of mapped view-entries. A view mode is used by passing its name to the view-factory getView method. The view-factory then looks up the view-entry using the other parameters of teh getView method and then looks in the view-mode object for the cooresponding view-entry.
- view-service this is service which can be used by a view. It is added to the view-factory, and then available to all the views created by that view factory.
View Lookup
When a view-requester asks for a ot-view of an ot-object which ot-view does it get?
View Factory Context
There can be multiple view factories in a hierachy. This is currently used by the report tool. A few new view entries are added to the view-factory, and a user-list service is also added. These new view-entries override the default entries. For example a multiple choice view is rendered as a table showing each student as a row and the choices as columns.
a root to store particular view documentation under:
OTViews
a review of an older version of the system
OTrunk View System Analysis
|